package Q806

class Solution {
    fun numberOfLines(widths: IntArray, s: String): IntArray {
        var arr = IntArray(2)
        arr[0] = 1
        s.toCharArray().forEach {
            arr[1] += widths[it - 'a']
            if(arr[1] > 100) {
                arr[1] = widths[it - 'a']
                arr[0]++
            }
        }
        return arr
    }
}


fun main() {

}